package com.jinunn.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.jinunn.system.common.base.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 部门表
 * </p>
 *
 * @author JIN
 * @since 2024-07-12
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName(value = "sys_dept")
public class Dept extends BaseEntity implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 部门名称
     */
    @TableField("name")
    private String name;

    /**
     * 部门编号
     */
    @TableField("code")
    private String code;

    /**
     * 父节点id
     */
    @TableField("parent_id")
    private Long parentId;

    /**
     * 父节点id路径
     */
    @TableField("tree_path")
    private String treePath;

    /**
     * 显示顺序
     */
    @TableField("sort")
    private Integer sort;

    /**
     * 状态(1-正常 0-禁用)
     */
    @TableField("status")
    private Integer status;

    /**
     * 创建人ID
     */
    @TableField("create_by")
    private Long createBy;

    /**
     * 修改人ID
     */
    @TableField("update_by")
    private Long updateBy;
}
